<?php include ("../smarty/libs/Smarty.class.php");

include ("../includes/common.php");
init();

//Sign Up
if($_REQUEST[Type]=="SignUp")
{
	signUpPage();
	die();
}

function signUpPage(){
	$smarty = new Smarty;
	$areas= get_row_con_info("areas","","","","0");
	$smarty->assign("areas",$areas);
	$smarty->display('signup.tpl');
}

If(isset($_REQUEST['submit'])!='')
{
	If($_REQUEST['first_name']=='' || $_REQUEST['last_name']=='' || $_REQUEST['phone']=='' || $_REQUEST['email']=='' || $_REQUEST['password']=='')
	{
	Echo "please fill the empty field.";
	}
	Else
	{
	$sql="insert into customers(first_name,last_name,cust_phone,email_Id,password) values('".$_REQUEST['first_name']."','".$_REQUEST['last_name']."', '".$_REQUEST['phone']."', '".$_REQUEST['email']."','".$_REQUEST['password']."')";
	$res=mysql_query($sql);
	If($res)
	{
	Echo "Record successfully inserted";
	}
	Else
	{
	Echo "There is some problem in inserting record";
	}
	
	}
}

?>